#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <omp.h>
#include <math.h>
#define ceild(n,d)  ceil(((double)(n))/((double)(d)))
#define max(x,y)    ((x) > (y)? (x) : (y))
#define min(x,y)    ((x) < (y)? (x) : (y))
#define myabs(x,y)  (((x) > (y))? ((x)-(y)) : ((y)-(x)))


#define  kernel(A) A[(t+1)%2][x][y] = 0.125 * (A[t%2][x+1][y] - 2.0 * A[t%2][x][y] + A[t%2][x-1][y]) + \
									   0.125 * (A[t%2][x][y+1] - 2.0 * A[t%2][x][y] + A[t%2][x][y-1]) + \
									   A[t%2][x][y]

#define  kernel_t(A, t) A[(t+1)%2][x][y] = 0.125 * (A[(t)%2][x+1][y] - 2.0 * A[(t)%2][x][y] + A[(t)%2][x-1][y]) + \
									   0.125 * (A[(t)%2][x][y+1] - 2.0 * A[(t)%2][x][y] + A[(t)%2][x][y-1]) + \
									   A[(t)%2][x][y]
#define XSLOPE 1
#define YSLOPE 1
#define XSTART 4
#define YSTART 4
#define DATA_TYPE double

int test(DATA_TYPE * B, int NX, int NY, int T, int Bx, int By, int tb);

